package y23.Jun;

import java.util.Scanner;

//求斐波那契数列的第n项
public class Test13 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            System.out.println(fibN(n));
        }
    }
    public static int fibN(int n){
        if(n == 1){
            return 0;
        } else if (n == 2||n == 3) {
            return 1;
        }
        return fibN(n-1)+fibN(n-2);
    }
}
